

package com.wsd.smartcarwasher.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel("洗车订单")
public class OrderInfo extends Order {
    @ApiModelProperty("分成比例")
    private BigDecimal profitRatio;
    @ApiModelProperty("服务开始时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date startTime;
    @ApiModelProperty("服务结束时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date endTime;
    @ApiModelProperty("门店id")
    private Integer machineId;
    @ApiModelProperty("短门店名称")
    private String machineName;
    @ApiModelProperty("门店信息")
    private Machine machine;
    @ApiModelProperty("会员卡id")
    private Integer cardId;
    @ApiModelProperty("服务id")
    private Integer serviceId;
    @ApiModelProperty("服务名称")
    private String serviceName;
    @ApiModelProperty("车辆记录id")
    private Integer carId;
    @ApiModelProperty("车辆信息")
    private Car car;
    @ApiModelProperty("用户信息")
    private UserInfo userInfo;
    @ApiModelProperty("评价信息")
    private RateInfo rateInfo;
    @ApiModelProperty("使用的优惠券id")
    private String userCouponId;
    @ApiModelProperty("消费状态 0 未消费 1 以消费 2 消费中急停")
    private Integer consumed;
    private WashService washService;
    private Coupon usedCoupon;
    @ApiModelProperty("分账状态 0 不用分账 1 未分账 2 已分账 ")
    private Integer prorateStatus;

    @ApiModelProperty("商户Id")
    private Integer partnerId;


    private Integer serviceStatus;
    private String message;

    private String beforeCarPhoto;  //洗车前
    private String afterCarPhoto;   //洗车后


    private String cardUcId;  //用户使用会员卡

    public String getCardUcId() {
        return cardUcId;
    }

    public void setCardUcId(String cardUcId) {
        this.cardUcId = cardUcId;
    }

    public String getBeforeCarPhoto() {
        return beforeCarPhoto;
    }

    public void setBeforeCarPhoto(String beforeCarPhoto) {
        this.beforeCarPhoto = beforeCarPhoto;
    }

    public String getAfterCarPhoto() {
        return afterCarPhoto;
    }

    public void setAfterCarPhoto(String afterCarPhoto) {
        this.afterCarPhoto = afterCarPhoto;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getServiceStatus() {
        return serviceStatus;
    }

    public void setServiceStatus(Integer serviceStatus) {
        this.serviceStatus = serviceStatus;
    }

    @ApiModelProperty("分账的订单号 ")
    private String prorateSn;

    private List<OrderVO> records;


    public String getProrateSn() {
        return prorateSn;
    }

    public void setProrateSn(String prorateSn) {
        this.prorateSn = prorateSn;
    }

    public List<OrderVO> getRecords() {
        return records;
    }

    public void setRecords(List<OrderVO> records) {
        this.records = records;
    }

    public Integer getProrateStatus() {
        return prorateStatus;
    }

    public void setProrateStatus(Integer prorateStatus) {
        this.prorateStatus = prorateStatus;
    }

    /**
     * 用户会员卡ID
     */
    private String ucId;

    public String getUcId() {
        return ucId;
    }

    public void setUcId(String ucId) {
        this.ucId = ucId;
    }

    public OrderInfo() {
    }

    public BigDecimal getProfitRatio() {
        return this.profitRatio;
    }

    public void setProfitRatio(BigDecimal profitRatio) {
        this.profitRatio = profitRatio;
    }

    public Date getStartTime() {
        return this.startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getMachineId() {
        return this.machineId;
    }

    public void setMachineId(Integer machineId) {
        this.machineId = machineId;
    }

    public String getMachineName() {
        return this.machineName;
    }

    public void setMachineName(String machineName) {
        this.machineName = machineName;
    }

    public Machine getMachine() {
        return this.machine;
    }

    public void setMachine(Machine machine) {
        this.machine = machine;
    }

    public Integer getCardId() {
        return this.cardId;
    }

    public void setCardId(Integer cardId) {
        this.cardId = cardId;
    }

    public Integer getServiceId() {
        return this.serviceId;
    }

    public void setServiceId(Integer serviceId) {
        this.serviceId = serviceId;
    }

    public String getServiceName() {
        return this.serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public Integer getCarId() {
        return this.carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }

    public boolean isUnpaid() {
        return 100 == this.getOrderStatus() && 0 == this.getPayStatus();
    }

    public Car getCar() {
        return this.car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public UserInfo getUserInfo() {
        return this.userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public RateInfo getRateInfo() {
        return this.rateInfo;
    }

    public void setRateInfo(RateInfo rateInfo) {
        this.rateInfo = rateInfo;
    }

    public String getUserCouponId() {
        return this.userCouponId;
    }

    public void setUserCouponId(String userCouponId) {
        this.userCouponId = userCouponId;
    }

    public void setConsumed(Integer consumed) {
        this.consumed = consumed;
    }

    public boolean orderConsumed() {
        return this.consumed != 0;
    }

    public Integer getConsumed() {
        return consumed;
    }

    public WashService getWashService() {
        return this.washService;
    }

    public void setWashService(WashService washService) {
        this.washService = washService;
    }

    public Coupon getUsedCoupon() {
        return this.usedCoupon;
    }

    public void setUsedCoupon(Coupon usedCoupon) {
        this.usedCoupon = usedCoupon;
    }

    public Integer getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(Integer partnerId) {
        this.partnerId = partnerId;
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
                "profitRatio=" + profitRatio +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", machineId=" + machineId +
                ", machineName='" + machineName + '\'' +
                ", machine=" + machine +
                ", cardId=" + cardId +
                ", serviceId=" + serviceId +
                ", serviceName='" + serviceName + '\'' +
                ", carId=" + carId +
                ", car=" + car +
                ", userInfo=" + userInfo +
                ", rateInfo=" + rateInfo +
                ", userCouponId='" + userCouponId + '\'' +
                ", consumed=" + consumed +
                ", washService=" + washService +
                ", usedCoupon=" + usedCoupon +
                ", prorateStatus=" + prorateStatus +
                ", partnerId=" + partnerId +
                ", serviceStatus=" + serviceStatus +
                ", message='" + message + '\'' +
                ", prorateSn='" + prorateSn + '\'' +
                ", records=" + records +
                ", ucId='" + ucId + '\'' +
                '}';
    }
}

/*
package com.wsd.smartcarwasher.domain;

import com.wsd.smartcarwasher.constans.Global;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;
*/
/*
 * 订单详情
 *//*

@ApiModel(value = "洗车订单")
public class OrderInfo extends Order {

    //分成比例
    @ApiModelProperty("分成比例")
    private BigDecimal profitRatio;
    // 服务开始时间
    @ApiModelProperty("服务开始时间")
    private Date startTime;
    // 服务结束时间
    @ApiModelProperty("服务结束时间")
    private Date endTime;

    //服务站点ID
    @ApiModelProperty("门店id")
    private Integer machineId;
    // 服务站点名称
    @ApiModelProperty("短门店名称")
    private String machineName;
    @ApiModelProperty("门店信息")
    private Machine machine;
    @ApiModelProperty("服务id")
    private Integer serviceId;
    @ApiModelProperty("服务名称")
    private String serviceName;
    @ApiModelProperty("车辆记录id")
    private Integer carId;
    @ApiModelProperty("车辆信息")
    private Car car;
    // 用户信息
    @ApiModelProperty("用户信息")
    private UserInfo userInfo;
    // 评价信息
    @ApiModelProperty("评价信息")
    private RateInfo rateInfo;

    @ApiModelProperty("使用的优惠券id")
    private String userCouponId;

    @ApiModelProperty("消费状态 0 未消费 1 以消费 2 消费中急停")
    private int consumed;

    // 洗车服务
    private WashService washService;

    // 使用的优惠券
    private Coupon usedCoupon;

    public BigDecimal getProfitRatio() {
        return profitRatio;
    }

    public void setProfitRatio(BigDecimal profitRatio) {
        this.profitRatio = profitRatio;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getMachineId() {
        return machineId;
    }

    public void setMachineId(Integer machineId) {
        this.machineId = machineId;
    }

    public String getMachineName() {
        return machineName;
    }

    public void setMachineName(String machineName) {
        this.machineName = machineName;
    }

    public Machine getMachine() {
        return machine;
    }

    public void setMachine(Machine machine) {
        this.machine = machine;
    }

    public Integer getServiceId() {
        return serviceId;
    }

    public void setServiceId(Integer serviceId) {
        this.serviceId = serviceId;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public Integer getCarId() {
        return carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }

    public boolean isUnpaid() {
        return Global.ORDER_STATUS_NORMAL == getOrderStatus() && Global.ORDER_PAY_STATUS_UNPAID == getPayStatus();
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public RateInfo getRateInfo() {
        return rateInfo;
    }

    public void setRateInfo(RateInfo rateInfo) {
        this.rateInfo = rateInfo;
    }

    public String getUserCouponId() {
        return userCouponId;
    }

    public void setUserCouponId(String userCouponId) {
        this.userCouponId = userCouponId;
    }

    public void setConsumed(int consumed) {
        this.consumed = consumed;
    }

    public boolean orderConsumed() {
        return consumed == Global.ORDER_IS_CONSUMED;
    }

    public int getConsumed() {
        return consumed;
    }

    public WashService getWashService() {
        return washService;
    }

    public void setWashService(WashService washService) {
        this.washService = washService;
    }

    public Coupon getUsedCoupon() {
        return usedCoupon;
    }

    public void setUsedCoupon(Coupon usedCoupon) {
        this.usedCoupon = usedCoupon;
    }
}
*/
